package 设计模式.结构型.decorate装饰器.Demo_1;

import 设计模式.结构型.decorate装饰器.Demo_1.domain.UserCoupon;
import 设计模式.结构型.decorate装饰器.Demo_1.domain.UserRedPacket;

/**
 * 促销类型
 *
 * @author admin
 */
public class SupportPromotions implements Cloneable {

    private int id;//该商品促销的ID
    private int promotionType;//促销类型： 1 优惠券 2 红包
    private int priority; //优先级
    private UserCoupon userCoupon; //用户领取该商品的优惠券
    private UserRedPacket userRedPacket; //用户领取该商品的红包

    //重写clone方法
    @Override
    public SupportPromotions clone() {
        SupportPromotions supportPromotions = null;
        try {
            supportPromotions = (SupportPromotions) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return supportPromotions;
    }
}